import type { IFieldProps, IConfigProps } from '@/components/sofastui/AdvancedTable/interface'

export const fields: IFieldProps[] = [
  {
    label: '标题',
    prop: 'title',
    import: true,
    export: true,
  },
  {
    label: 'IP地址',
    prop: 'ip',
    import: true,
    export: true,
  },
  {
    label: '操作人',
    prop: 'userName',
    import: true,
    export: true,
  },
  {
    label: '请求类型',
    prop: 'requestType',
    import: true,
    export: true,
  },
  {
    label: '请求时间(ms)',
    prop: 'time',
    import: true,
    export: true,
  },
  {
    label: '创建时间',
    prop: 'createdAt',
    import: true,
    export: true,
  },
]

export const config: IConfigProps = {
  name: 'sysLogTable',
  rowKey: 'id',
  url: '/api/sys/log',
  selection: false,
  add: false,
  delete: false,
  expand: false,
  showIndex: true,
  import: false,
  export: true,
  search: true,
  advancedSearch: true,
  refresh: true,
  settings: true,
}
